<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of vTableauStock
 *
 * @author Rolland
 */
class vTableauStock {
    public function afficherSite($unTableau){
        echo '<table>
                <tr>
                        <th>Type</th><th>Modèle</th><th>Code barre</th><th>Action</th>
                </tr>';
                foreach ($unTableau as $row ){
                    echo '<tr>';
                    echo '<td>' . $row["type"] . '</td>';
                    echo '<td>' . $row["modele"] . '</td>';
                    echo '<td>' . $row["codeBarre"] . '</td>';
                    echo '<td><a href="?do=modif&id='.$row["id"].'">Modifier</a> / <a href="?do=sortir&id='.$row["id"].'">Sortir</a></td>';
                    echo '</tr>';
                }
       echo '</table>';
    }
    
    public function afficherEntreeSortie($unTableau){
        echo '<table>
                <tr>
                        <th>Modèle</th><th>Code barre</th>
                </tr>';
                foreach ($unTableau as $row ){
                    echo '<tr>';
                    echo '<td>' . $row["modele"] . '</td>';
                    echo '<td>' . $row["codeBarre"] . '</td>';
                    echo '</tr>';
                }
        echo '</table>';
    }
}

?>
